import 'package:eye_flutter_app/demo/FlChart/BarChartSample1.dart';
import 'package:eye_flutter_app/demo/FlChart/PieChartSample2.dart';
import 'package:eye_flutter_app/demo/FlChart/BarChartSample1.dart';
import 'package:flutter/material.dart';

import 'LineChartSample1.dart';
import 'LineChartSample2.dart';

class FlChartDemo extends StatefulWidget {
  FlChartDemo({Key? key}) : super(key: key);
  _FlChartDemoState createState() => _FlChartDemoState();
}

class _FlChartDemoState extends State<FlChartDemo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("fl_chart图表"),
      ),
      body: ListView(
        padding: EdgeInsets.all(10),
        children: [
          Container(
            height: 300,
            child: Row(
              children: [
                Expanded(
                  flex: 1,
                  child: LineChartSample1(),
                ),
                SizedBox(
                  width: 10,
                ),
                Expanded(
                  flex: 1,
                  child: LineChartSample2(),
                )
              ],
            ),
          ),
          Container(
            height: 300,
            child: Row(
              children: [
                Expanded(
                  flex: 1,
                  child: BarChartSample1(),
                ),
                SizedBox(
                  width: 10,
                ),
                Expanded(
                  flex: 1,
                  child: PieChartSample2(),
                ),
              ],
            ),
          )
        ],
      ),
    );
  }
}
